#ifndef __HW_CONFIG_H__
#define __HW_CONFIG_H__

#include "hw_config.h"
#include "ch32v_def.h"
#include "clock.h"
#include "usbd_if.h"

#ifdef __cplusplus
extern "C"
{
#endif

    void hw_config_init(void)
    {
        SysTick_Config(SystemCoreClock / 8000);

#if defined(USBCON) && defined(USBD_USE_CDC)
        NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
        USBD_CDC_init();
#endif
    }

#ifdef __cplusplus
}
#endif
#endif // __HW_CONFIG_H__